package com.qf.boot2202day03.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.bind.annotation.PathVariable;

import javax.validation.constraints.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class HelloVo {

    @NotNull
    private Integer id;

//    @NotNull  // 需要该参数不能为null
    @NotEmpty   // 不可以为空串
    @Size(min = 5,max = 100)
    private String name;

    @Email
    private String email;

    @Pattern(regexp = "^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0\\d|10|11|12)(?:0[1-9]|[1-2]\\d|30|31)\\d{3}[\\dXx]$")
    private String sf;

}
